package com.warren.test;

import java.util.Arrays;
import java.util.Collection;

/**
 * @version V1.0
 * @Description:
 * @author: warren
 * @date: 2022/7/7 18:10
 */
public class Sort {
    public static void main(String[] args) {
        int[] nums = {1, 8, 5, 2, 4, 9, 7};
        boolean flag;
        int temp = 0;
        for (int i = nums.length -1; i > 0; i--) {
            flag = false;
            for (int j = 0; j < i; j++) {
                if (nums[j] > nums[j + 1]) {
                    temp = nums[j];
                    nums[j] = nums[j + 1];
                    nums[j + 1] = temp;
                    flag = true;
                }
            }
            if (flag == false) {
                break;
            }
        }
        Arrays.stream(nums).forEach(s -> System.out.print(s));
        String s1 = "hello";
        String s2 = "hello";
        System.out.println(s1 == s2);
    }
}
